import django.contrib.auth.models

raw_password = 'rafal'
salt = 'salt'

digest = get_hexdigest('sha1', salt, raw_password)

